<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="layout">
<head>
    <title>任务列表</title>
</head>
<body>
<h1 layout:fragment="header">任务列表</h1>
<div layout:fragment="content" class="container">
    <table class="table table-bordered table-striped">
        <thead>
        <tr>
            <td>ID</td>
            <td>NAME</td>
            <td>OPTS</td>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${tasks.empty}">
            <td colspan="3">
                No messages
            </td>
        </tr>
        <tr th:each="task : ${tasks}">
            <td th:text="${task.id}"></td>
            <td th:text="${task.name}"></td>
            <td>
                <a th:href="@{'/activiti/task/complete/' + ${task.id}}">完成</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>